#include "stdio.h"
//冒泡排序
int main ()
{
int i;
int j;
int arr[] = {1,2,3,4,5,6,7,8,9};
int sz = sizeof(arr)/sizeof(arr[0]);
for(i = 0;i < sz; i++)
{
 int num;
    for (j = i+1;j < sz; j++)
     {
        if (arr[i] < arr[j])
          num = arr[i];
          arr[i] = arr[j];
          arr[j] = num;
     }
}
     for (i = 0;i < sz; i++)
         printf ("%d ",arr[i]);
}
